In number theory, a left-truncatable prime is a prime number which, in a given base, contains no 0, and if the leading ("left") digit is successively removed, then all resulting numbers are prime. For example 9137, since 9137, 137, 37 and 7 are all prime. Decimal representation is often assumed and always used in this article.
A right-truncatable prime is a prime which remains prime when the last ("right") digit is successively removed. For example 7393, since 7393, 739, 73, 7 are all prime.
There are exactly 4260 decimal left-truncatable primes:
The largest is the 24-digit 357686312646216567629137.
There are 83 right-truncatable primes. The complete list:
The largest is the 8-digit 73939133. All primes above 5 end with digit 1, 3, 7 or 9, so a right-truncatable prime can only contain those digits after the leading digit.
There are 15 primes which are both left-truncatable and right-truncatable. They have been called two-sided primes. The complete list:
While the primality of a number does not depend on the numeral system used, truncatable primes are defined only in relation with a given base. A variation involves removing 2 or more decimal digits at a time. This is mathematically equivalent to using base 100 or a larger power of 10, with the restriction that base 10n digits must be at least 10n−1, in order to match a decimal n-digit number with no leading 0.